package es.wtestgen.util;

public class Utiles {
	
	public static String quitarHTML(String htmlString)
	{
	    String noHTMLString = htmlString.replaceAll("\\<.*?\\>", "");
	    noHTMLString = noHTMLString.replaceAll("&aacute;", "á");
		noHTMLString = noHTMLString.replaceAll("&Aacute;", "Á");
		noHTMLString = noHTMLString.replaceAll("&eacute;", "é");
		noHTMLString = noHTMLString.replaceAll("&Eacute;", "É");
		noHTMLString = noHTMLString.replaceAll("&iacute;", "í");
		noHTMLString = noHTMLString.replaceAll("&Iacute;", "Í");
		noHTMLString = noHTMLString.replaceAll("&Oacute;", "Ó");
		noHTMLString = noHTMLString.replaceAll("&oacute;", "ó");
		noHTMLString = noHTMLString.replaceAll("&uacute;", "ú");
		noHTMLString = noHTMLString.replaceAll("&Uacute;", "Ú");
		noHTMLString = noHTMLString.replaceAll("&iquest;", "¿");
		noHTMLString = noHTMLString.replaceAll("&ntilde;", "ñ");
		noHTMLString = noHTMLString.replaceAll("&Ntilde;", "Ñ");
	    return noHTMLString;
	}
	
	public static String quitarHTMLPdf(String htmlString)
	{
		String noHTMLString = htmlString.replaceAll("\\<.*?\\>", "");
		noHTMLString = noHTMLString.replaceAll("&aacute;", "á");
		noHTMLString = noHTMLString.replaceAll("&Aacute;", "Á");
		noHTMLString = noHTMLString.replaceAll("&eacute;", "é");
		noHTMLString = noHTMLString.replaceAll("&Eacute;", "É");
		noHTMLString = noHTMLString.replaceAll("&iacute;", "í");
		noHTMLString = noHTMLString.replaceAll("&Iacute;", "Í");
		noHTMLString = noHTMLString.replaceAll("&Oacute;", "Ó");
		noHTMLString = noHTMLString.replaceAll("&oacute;", "ó");
		noHTMLString = noHTMLString.replaceAll("&uacute;", "ú");
		noHTMLString = noHTMLString.replaceAll("&Uacute;", "Ú");
		noHTMLString = noHTMLString.replaceAll("&iquest;", "¿");
		noHTMLString = noHTMLString.replaceAll("&ntilde;", "ñ");
		noHTMLString = noHTMLString.replaceAll("&Ntilde;", "Ñ");
		return noHTMLString;
	}
	
}
